﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using FeedAntGame.Sprite;
using FeedAntGame.Sprite.Event;
using Microsoft.Xna.Framework.Graphics;
using FeedAntGame.Sprite.Combo;

namespace FeedAntGame.Control
{
    class EditText : BaseControl
    {
        public enum TYPE { NAME_INPUT }
        TYPE type;

        
        /************************************************************************/
        /*                  GET/SET                                                                     */
        /************************************************************************/
        /// <summary>
        /// should use EditTextSprite
        /// </summary>
        internal override BaseSprite Sprite
        {
            get { return sprite; }
        }
        internal TYPE Type
        {
            get { return type; }
            set 
            { 
                type = value;
                createInstance(sprite.Position);
            }
        }

        
        /************************************************************************/
        /*                  Constructor                                                                     */
        /************************************************************************/
        public EditText(Game game, TYPE type, Vector2 position)
            :base(game)
        {
            this.type = type;
            createInstance(position);
        }

        protected override void createInstance(Vector2 position)
        {
            switch (type)
            {       
                case TYPE.NAME_INPUT:
                    sprite = new EditTextSprite(
                        Game.Content.Load<Texture2D>(@"Images\name_input"), position, new Point(264, 41), 1, Game
                        );
                         
                    break;
                    
            }
        }
    }
}
